package connection.commands;

import java.io.IOException;
import java.io.ObjectOutputStream;

/** @author Mihail A. Muhin */
public class PutFileCommand extends BaseCommand {
  private String filename = null;
  private String contents = null;

  public String getFilename() {
    return filename;
  }

  public String getContents() {
    return contents;
  }

  public PutFileCommand(String filename, String contents) {
    this.filename = filename;
    this.contents = contents;
  }

  public void write(ObjectOutputStream oos) {
    try {
      writeClassName(oos);
      oos.writeObject(filename);
      oos.writeObject(contents);
    } catch (IOException e) {
    }
  }
}
